package com.antt.cn.test2.uis.activities;

import android.text.Layout;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

import com.antt.cn.test2.R;
import com.antt.cn.test2.uis.base.BaseActivity;
import com.antt.cn.test2.utils.AntLog;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * Created by Ant on 2017/5/16  17:28
 * <p>
 * <p>
 *
 * @version 1.0.0
 * @auther Ant
 */

public class Test08 extends BaseActivity {
    @BindView(R.id.ac_test08_otx_01)
    TextView text;
    @BindView(R.id.ac_test08_obt_01)
    Button obt;


    @Override
    public int getLayoutId() {
        return R.layout.ac_test08_layout;
    }

    @Override
    public void initView() {
        ButterKnife.bind(this);

    }

    @Override
    public void initData() {

    }

    @Override
    public void initListener() {

    }


    @OnClick({R.id.ac_test08_obt_01, R.id.ac_test08_obt_02})
    public void onclick(View v) {
        switch (v.getId()) {
            case R.id.ac_test08_obt_01:
//                AntLog.i("onclicked");
//
//                AntLog.i("text==" + text.getText().toString());
//                Layout layout = text.getLayout();
//
////        text.setLayoutParams();
//                text.requestLayout();
//                text.invalidate();
                text.setTextSize(18);
                text.setText("asdfasdf");
                Layout layout1 = text.getLayout();
                AntLog.i("layout1==" + (layout1 == null));
                break;
            case R.id.ac_test08_obt_02:
                text.setTextSize(18);

                AntLog.i("layout1==" + (text.getLayout() == null));
                break;
        }
    }

}
